#include<iostream>
#include"myString.h"
#include<cmath>
#include<vector>
using namespace std;

class myString {
private:
	myI length;
	char* str;
public:
	myString() {
		str = 0;
		length = 0;
	}
	~myString() {
		if (str) {
			delete[] str;
		}
	}
	myString(const string& s) {
		int l = s.length();
		length = l;
		if (l==0) {
			str = nullptr;
			return;
		}
		str = new char[l];
		for (int i=0;i<l;i++) {
			str[i] = s.at(i);
		}
	}
	myString(const char* s) {

	}
};

static void getNext(string &s, vector<int>& next) {
	next[0] = -1;
	next[1] = 0;
	for (int i=2;i<s.length();++i) {
		if (s[i-1]==s[i-2]) {
			next[i] = next[i - 1]+1;
		}
		else {
			while (1) {

			}
		}
	}
}

int My::find_kmp(string s, string text)
{
	int n = s.size();
	if (n == 0) {
		return -1;
	}
	vector<int> next(n,0);
	return 0;
}
